package com.sx.micowell.framework.adapter;

import android.widget.ImageView;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.miloyu.modelnet.response.LearnedCourseVO;
import com.sx.micowell.R;
import com.sx.micowell.framework.tools.cmd.CmdException;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

/**
 * @Description
 * @Author 梁浩文
 * @Date 2021/9/17 11:49
 */
public class ExceptionAdapter extends BaseQuickAdapter<CmdException, BaseViewHolder> {
    public ExceptionAdapter(@Nullable List<CmdException> data) {
        super(R.layout.item_exception, data);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, CmdException e) {
        baseViewHolder.<ImageView>findView(R.id.item_image).setSelected(e.error);
        baseViewHolder.<TextView>findView(R.id.item_tv).setText(e.name);
    }
}
